<!doctype html>
<html style="" class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="referrer" content="never">
		<meta http-equiv="Content-Language" content="zh-cn">
		<meta name="apple-mobile-web-app-capable" content="no">
		<meta name="apple-touch-fullscreen" content="yes">
		<meta name="format-detection" content="telephone=no,email=no">
		<meta name="apple-mobile-web-app-status-bar-style" content="white">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<meta http-equiv="Expires" content="0">
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-control" content="no-cache">
		<meta http-equiv="Cache" content="no-cache">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>共享设备测试</title>
		<link rel="stylesheet" href="css/index.css" />
		<link rel="stylesheet" href="css/alert.css" />
	</head>
	<body>
		<script>
			
			/**
			 * @param {String} text 需要复制的内容
			 * @return {Boolean} 复制成功:true或者复制失败:false  执行完函数后，按ctrl + v试试
			*/
			function copy(containerid) {
				var con = document.getElementById(containerid).innerText;
			    var textareaEl = document.createElement('textarea');
			    textareaEl.setAttribute('readonly', 'readonly'); // 防止手机上弹出软键盘
			    textareaEl.value = con;
			    document.body.appendChild(textareaEl);
			    textareaEl.select();
			    var res = document.execCommand('copy');
			    document.body.removeChild(textareaEl);
			    console.log("复制成功");
			    return res;
			}
		</script>
		<textarea style="display: none;" id="textarea"></textarea>
		<div class="contain_main">
			<div id="main_pnl_1" class="notice_box" style="text-align: center;">
			<span class="red_t" style="font-size:1.5em;">设备信息</span> </div> <br>
			<div class="loginWrap">
				<span>设备SN:</span>
				<input id="baseSn" value="6000000007" maxlength="10"  class="accreditInput" placeholder="底座sn">
				<button class="loginBtn"    onClick="loadDeviceInfo()">查询</button>
			</div>
			<br>
			<div id="main_pnl_2" class="inforData_box" style="background-color: #dbe3d1">
				<ul>
					<li> <span class="inforData_tile">&nbsp;&nbsp;最近登录:</span> <span id="updateTime">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;设备IMEI:</span> <span id="deviceImei">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;经纬度:</span> <span id="lon">未加载</span>,<span id="lat">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;信号强度:</span> <span id="signalIntensity">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;升级时间:</span> <span id="sjTime">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;软件版本:</span> <span id="softVersion">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;生产日期:</span> <span id="deviceProduceDate">未加载</span> </li>
					<li> <span class="inforData_tile">&nbsp;&nbsp;ICCID:</span> <span id="deviceIccid">未加载</span> <a href="javascript:void(0)"
						 style="text-decoration:none;" onclick="copy('deviceIccid')">复制&nbsp;&nbsp;</a> </li>
				</ul>
			</div> <br>
			<div class="notice_box" id="cbds" style="background-color: #d8dde6">
				<span>充电宝列表:</span>
				<div style="height: 20px;"></div>
				<ul id="cdsList">
					<li>
						<div class="loginWrap">
							<input disabled="disabled" maxlength="10"  class="accreditInput" placeholder="充电宝sn">
							<button class="loginBtn"    onClick="login()">借出</button>
							<button class="loginBtn"  onClick="login()">弹出</button>
						</div>
					</li>
				</ul>
			</div>
			<br>
			
		</div>
	</body>
	<script src="js/jquery.min.js"></script>
	<script src="js/rentAjax.js"></script>
	<script src="js/rent.js"></script>
	<script src="js/alert.js"></script>
	<script>
	$(function(){
		console.log("初始化。。。")
		var sn = getQueryString("baseSn");
		console.log("url sn :",sn);
		if(sn != "" && sn != null){
			$("#baseSn").val(sn);
		}
		loadIndex();
		setInterval("loadDeviceInfo()",3000);
	})

	</script>
</html>
